/*
 * @Description: 摄像头拍照配置
 */
import zhreq from "@/api/axios";
import axios from "@/api/axios";
// import xjaxiosOnline from "@/api/axios";
// axios.defaults.baseURL
export default {
  /**
   * @description: 获取表格 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getlist(params, name) {
    return axios.post("/v3/growth/collectSetting/queryPageByCondition", {
      ...params,
      order: 'asc',
      auditFlag: 1,
      entity: {
        "farmingTypeNo": sessionStorage.getItem("farmingTypeNo"),
        "collectName": name
      }
    });
  },
  /**
   * @description:模糊查询 *代表必填
   */
  getqueryList(params) {
    return zhreq.post("/collectSetting/delCollectSettingList/queryByCondition", {
      // auditFlag: 1,
      phaseName: params
    });
  },
  /**
   * @description: 添加
   * @param {Object}  *
   */
  addlist(params) {
    return axios.post('/v3/growth/collectSetting/addCollectConfig', {
      ...params,
      "organizationNo": sessionStorage.getItem("organizationNo"),
      "farmingTypeNo": sessionStorage.getItem("farmingTypeNo")
    });
  },
  /**
   * @description: 批量删除
   * @param {Object}  *
   */
  dellist(params) {
    return axios.get(`/v3/growth/collectSetting/delListByNo?noList=${params}`, {
      noList: params
    });
  },
  /**
   * @description: 修改
   * @param {Object}  *
   */
  editlist(params) {
    return axios.post('/v3/growth/collectSetting/editCollectConfig', params);
  },
  /**
   * @description: 查询采集配置
   * @param {Object}  *
   */
  querybycondition(no) {
    return axios.get(`/v3/growth/collectSetting/queryCollectConfigByNo?no=${no}`);
  }
};
